// let str = 'yang'

// let obj = { name: 'xiaoyang'}

// console.log(Object.prototype.toString.call(obj));  // [object Object]

// split 字符串分割方法

// if(Object.prototype.toString.call(obj).slice(8,14) === 'Object') {
//     console.log('success');
// }

let target = true

function myType(target) {
    let type = Object.prototype.call(target)
    return type.slice(8, -1)
}

if (myType(target) === 'Boolean') {
    console.log('success');
}